#ifndef _Thread
#define _Thread

#include <pthread.h>

class Thread
{
private:
    pthread_t _pthid;
    bool _isRunning;

    virtual void run() = 0;
    static void* start_routine(void*);

public:
    Thread();
    //~Thread();    // 析构函数需要写虚函数
    virtual ~Thread();
    void start();
    void join();

};

#endif

